import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: 'index'
    },
    {
      path: '/index',
      component: resolve => require(['@/pages/home'], resolve)//筑功者首页
    },
    {
      path: '/projects',
      component: resolve => require(['@/pages/projects/index'], resolve)//项目列表
    },
    {
      path: '/projects/detail/:id',
      component: resolve => require(['@/pages/projects/detail'], resolve)//项目细节
    },
    {
      path: '/jobs',
      component: resolve => require(['@/pages/jobs/index'], resolve)  // 职位列表  
    },
    {
      path: '/jobs/detail/:id',
      component: resolve => require(['@/pages/jobs/detail'], resolve)// 职位详情
    },
    {
      path: '/news',
      component: resolve => require(['@/pages/news/index'], resolve),//新闻 
    },
    {
      path: '/news/detail/:id',
      component: resolve => require(['@/pages/news/detail'], resolve),//新闻页面详情
    },
    {
      path: '/m/:id',
      component: resolve => require(['@/pages/m/detail'], resolve), // 个人公共组件
    },
    {
      path: '/c/:id',
      component: resolve => require(['@/pages/c/detail'], resolve),// 企业公共组件
    },
    {
      path: '/user',
      component: resolve => require(['@/pages/user/index'], resolve),// 个人中心首页
    },
    {
      path: '/user/service',
      name:"service",
      component: resolve => require(['@/pages/user/service/index'], resolve),// 个人服务页面
    },
    {
      path: '/user/service/add',
      component: resolve => require(['@/pages/user/service/add'], resolve),// 添加服务页面
    },
    {
      path: '/service/index',
      component: resolve => require(['@/pages/service/index'], resolve),// 服务页面
    },
    {
      path: '/user/invite/introduce',
      component: resolve => require(['@/pages/user/invite/introduce'], resolve),// 邀请介绍页
    },
    {
      path: '/user/invite/invite',
      component: resolve => require(['@/pages/user/invite/invite'], resolve),// 邀请页
    },
    {
      path: '/user/about',
      component: resolve => require(['@/pages/user/about'], resolve),// 关于筑功者页面
    },
    {
      path: '/user/kefu',
      component: resolve => require(['@/pages/user/kefu'], resolve),// 联系客服页面
    },
    {
      path: '/user/vip',
      component: resolve => require(['@/pages/user/vip'], resolve),// 会员权益
    },
    {
      path: '/user/info',
      component: resolve => require(['@/pages/user/info'], resolve),// 个人资料编辑页
    },
    {
      path: '/user/resume',
      component: resolve => require(['@/pages/user/resume'], resolve),// 个人简历页面
    },
    {
      path: '/user/position',
      component: resolve => require(['@/pages/user/position'], resolve), // 个人职位管理页面
    },
    {
      path: '/user/position/candidate/:id',
      component: resolve => require(['@/pages/user/positionCandi'], resolve), // 个人职位管理候选人页面
    },
    {
      path: '/user/project',
      component: resolve => require(['@/pages/user/project'], resolve), // 个人项目管理页面
    },
    {
      path:'/user/project/candidate/:id',
      component: resolve => require(['@/pages/user/projectCandi'], resolve), // 个人项目管理候选人页面
    },
    {
      path: '/user/security',
      component: resolve => require(['@/pages/user/security/index'], resolve), // 个人安全页面
    },
    {
      path: '/user/security/cIndetificate',
      component: resolve => require(['@/pages/user/security/cIndetificate'], resolve),//证书认证
    },
    {
      path: '/user/security/idIndetificate',
      component: resolve => require(['@/pages/user/security/idIndetificate'], resolve),//身份认证
    },
    {
      path: '/user/collect',
      component: resolve => require(['@/pages/user/collect'], resolve),//个人收藏页面
    },
    {
      path: '/user/message',
      component: resolve => require(['@/pages/user/message/index'], resolve),//个人消息页面
    },
    {
      path: '/user/message/detail/:id',
      component: resolve => require(['@/pages/user/message/detail'], resolve),//个人消息页面
    },
    {
      path: '/user/strategy',
      component: resolve => require(['@/pages/user/strategy/strategy'], resolve),//攻略页面
    },
    {
      path: '/user/skill',
      component: resolve => require(['@/pages/user/strategy/skill'], resolve),//技能
    },
    {
      path: '/user/help',
      component: resolve => require(['@/pages/user/help'], resolve),//帮助中心
    },
    {
      path: '/zgz',
      component: resolve => require(['@/pages/zgz/index'], resolve),//筑功者
    },
    {
      path: '/auth/login',
      component: resolve => require(['@/pages/auth/login'], resolve),//登录页面
    },
    {
      path: '/auth/findpwd',
      component: resolve => require(['@/pages/auth/findpwd'], resolve),//登录页面
    },
    {
      path: '/auth/register',
      component: resolve => require(['@/pages/auth/register'], resolve),//注册页面
    },
    {
      path: '/release/project',
      component: resolve => require(['@/pages/release/project'], resolve),//发布项目
    },
    {
      path: '/release/project/step1/:id',
      component: resolve => require(['@/pages/release/step1'], resolve),//发布项目支付过程
    },
    {
      path: '/release/project/step2',
      component: resolve => require(['@/pages/release/step2'], resolve),//项目预览过程
    },
    {
      path: '/release/project/step3',
      component: resolve => require(['@/pages/release/step3'], resolve),//项目发布成功
    },
    {
      path: '/bleachery',
      component: resolve => require(['@/pages/bleachery/index'], resolve),//晒场
    },
    {
      path: '/user/movement',
      component: resolve => require(['@/pages/user/movement/index'], resolve),//我的动态
    },
    {
      path: '/user/movement/edit/:id',
      component: resolve => require(['@/pages/user/movement/edit'], resolve),//编辑动态
    },
    {
      path: '/user/movement/add',
      component: resolve => require(['@/pages/user/movement/add'], resolve),//发布动态
    },
    {
      path: '/user/cvip',
      component: resolve => require(['@/pages/user/cvip'], resolve),//公司会员
    },
    {
      path: '/user/resume2',
      component: resolve => require(['@/pages/user/resume2'], resolve),//在线简历预览
    },
    {
      path: '/user/resume2/:id',
      component: resolve => require(['@/pages/user/resume2'], resolve),//在线简历预览
    },
    {
      path:'*',
      component:resolve => require(['@/pages/components/error'], resolve),//路由导航出错
   }
  ]
})
